package it.low.game.client.server;

import it.low.game.core.element.ActiveElement;
import it.low.game.core.location.MapPoint;
import it.low.game.core.message.ClientEvent;
import it.low.game.core.message.ElementState;
import it.low.game.core.message.PlayerEvent;

import java.util.Collection;
import java.util.Set;

public interface ClientServerInterface {
	
	public int init(long clientId);
	
	public void close(long clientId);
		
	// SEND EVENTS TO THE SERVER
	
	public void sendClientEvent(ClientEvent clientEvent);
	
	public void sendPlayerEvent(PlayerEvent playerEvent);
	
	// RECEIVE THE WORLD STATE FROM THE SERVER
	
	public void receiveWorldState(long elapsedTime);
	
	public ElementState receivePlayerState(long playerId);
	
	public Set<ElementState> receiveElementsState(long playerId);
	
	// TO START THE GAME 
	
	public ActiveElement loadPlayer(long clientId);
	
	public String[][] loadMap();
	
	public Collection<ActiveElement> loadBots();	
	
	public ActiveElement initPlayer(long playerId, int size, MapPoint mapPosition);
	
	public ActiveElement initBot(long botId, int size);
		
}
